<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>添加客户 - 客户管理 - H-ui.admin v3.1</title>
<meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
<style type="text/css">
	.show_img_tpl{
		position: relative;
	    text-align: center;
	    width: 697px;
	    height: 458px;
	    margin-top: 20px;
	    margin-left:-60px;
	}
	.show_img_tpl .tmdbg{
		width:697px;
	}
	.show_img_tpl .phone{
		position: absolute;
	    top: 154px;
	    left: 71px;
	    width: 107px;
	    height: 194px;
	    border: 1px solid #ccc;
	    z-index: 9;
	}
	.show_img_tpl .pc{
		position: absolute;
	    top: 24px;
		left: 216px;
		width: 420px;
		height: 288px;
	    border: 1px solid #ccc;
	    z-index: 9;
	}
	.template img{width:100%;border:1px solid #ccc;}
	.template p{text-align:center;}
</style>
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
		<input type="hidden" class="input-text" value="{$user.id}" id="id" name="id">
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">客户名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" disabled="disabled" style="cursor:not-allowed;" class="input-text" value="{$user.cname}" placeholder="客户名称" id="cname" name="cname">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">账号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" disabled="disabled" style="cursor:not-allowed;" class="input-text" value="{$user.account}" placeholder="账号" id="account" name="account">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">密码：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="password" class="input-text" value="" placeholder="密码" id="password" name="password">
				<p style="font-size:10px;color:#ddd;">为空则不会修改密码</p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">模板模式：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<span class="select-box" style="width:150px;">
					<select name="model" id="tpl_select" class="select">
					  {volist name="model" id="vo" key="k"}
					  	<option value="{$k}" {if $k==$user.model}selected{/if}>&nbsp;{$vo}&nbsp;</option>
					  {/volist}
					</select>
				</span>
				<div class="show_img_tpl">
					<img class="tmdbg" src="/static/img/bg_pc_phone_h.png">
					<img class="phone img" src="/static/img/tpl_{$user.model}.png">
					<img class="pc img" src="/static/img/pc_index_{$user.model}.jpg">
				</div>
			</div>
		</div>
		<div class="row cl template">
			<label class="form-label col-xs-3 col-sm-2">模板选择：</label>
			<div class="formControls col-xs-8 col-sm-9 templation1">
				<div class="col-sm-4">
					<img src="/static/img/template1.jpg">
					<p><input type="radio" name="template" value="1" {if $user.template==1}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template2.jpg">
					<p><input type="radio" name="template" value="2" {if $user.template==2}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template3.jpg">
					<p><input type="radio" name="template" value="3" {if $user.template==3}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template4.jpg">
					<p><input type="radio" name="template" value="4" {if $user.template==4}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template5.jpg">
					<p><input type="radio" name="template" value="5" {if $user.template==5}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template6.jpg">
					<p><input type="radio" name="template" value="6" {if $user.template==6}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template7.jpg">
					<p><input type="radio" name="template" value="7" {if $user.template==7}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template8.jpg">
					<p><input type="radio" name="template" value="8" {if $user.template==8}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template9.jpg">
					<p><input type="radio" name="template" value="9" {if $user.template==9}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template10.jpg">
					<p><input type="radio" name="template" value="10" {if $user.template==10}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template11.jpg">
					<p><input type="radio" name="template" value="11" {if $user.template==11}checked{/if}></p>
				</div>
				<div class="col-sm-4">
					<img src="/static/img/template12.jpg">
					<p><input type="radio" name="template" value="12" {if $user.template==12}checked{/if}></p>
				</div>
			</div>
			<div class="formControls col-xs-8 col-sm-9 templation2">
				<div class="col-sm-4">
					<img src="/static/img/tpl_2.png">
					<p><input type="radio" name="template2" value="1" {if $user.template2==1}checked{/if}></p>
				</div>
			</div>
			<div class="formControls col-xs-8 col-sm-9 templation3">
				<div class="col-sm-4">
					<img src="/static/img/tpl_3.png">
					<p><input type="radio" name="template3" value="1" {if $user.template3==1}checked{/if}></p>
				</div>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
var tplindex = 1;
$('#tpl_select').change(function(){
  tplindex = $(this).val();
  $('.show_img_tpl .phone').attr('src', '/static/img/tpl_' + tplindex + '.png');
  $('.show_img_tpl .pc').attr('src', '/static/img/pc_index_' + tplindex + '.jpg');
  $(".templation"+tplindex).siblings("div").css({"display":"none"});
  $(".templation"+tplindex).css({"display":"block"});
});
$(function(){
	$(".templation"+"{$user.model}").css({"display":"block"});
	$(".templation"+"{$user.model}").siblings("div").css({"display":"none"});
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#form-admin-add").validate({
		rules:{},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit({
				type: 'post',
				url: "{:url('customer_edit')}",
				success: function(data){
					if(data.code==200){
						// var index = parent.layer.getFrameIndex(window.name);
						parent.location.reload();
						// parent.layer.close(index);
					}else{
						layer.msg('失败！',{icon:2,time:3000});
					}

				},
                error: function(XmlHttpRequest, textStatus, errorThrown){
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);
				}
			});
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>